Deprecate GdkEventVisibility and ::visibility-notify-event
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 Mar 2014 23:31:06 +0000 (18:31 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 4 Mar 2014 02:39:03 +0000 (21:39 -0500)
These don't really work anymore in a composited world.
Lets make it official.
https://bugzilla.gnome.org/show_bug.cgi?id=481073

gdk/gdkevents.h
gtk/gtkwidget.c

index 896e18b272e511b0d8c8419e16951c8ef9bcfb17..e9189834f332ba75ef544d908ea8fde0d743c55a 100644 (file)
@@ -555,6 +555,11 @@ struct _GdkEventExpose
  *   %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
  *
  * Generated when the window visibility status has changed.
+ *
+ * Deprecated: 3.12: Modern composited windowing systems with pervasive
+ *     transparency make it impossible to track the visibility of a window
+ *     reliably, so this event can not be guaranteed to provide useful
+ *     information.
  */
 struct _GdkEventVisibility
 {
index 52cf13f387692ab9f2274fa44418b0f8502000b0..f3bfd810acf6575b7f829d32e8890b09255dd5a5 100644 (file)
@@ -3178,14 +3178,19 @@ G_GNUC_END_IGNORE_DEPRECATIONS
    * @event: (type Gdk.EventVisibility): the #GdkEventVisibility which
    *   triggered this signal.
    *
-   * The ::visibility-notify-event will be emitted when the @widget's window
-   * is obscured or unobscured.
+   * The ::visibility-notify-event will be emitted when the @widget's
+   * window is obscured or unobscured.
    *
    * To receive this signal the #GdkWindow associated to the widget needs
    * to enable the #GDK_VISIBILITY_NOTIFY_MASK mask.
    *
    * Returns: %TRUE to stop other handlers from being invoked for the event.
    *   %FALSE to propagate the event further.
+   *
+   * Deprecated: 3.12: Modern composited windowing systems with pervasive
+   *     transparency make it impossible to track the visibility of a window
+   *     reliably, so this signal can not be guaranteed to provide useful
+   *     information.
    */
   widget_signals[VISIBILITY_NOTIFY_EVENT] =
     g_signal_new (I_("visibility-notify-event"),
@@ -3195,7 +3200,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                  _gtk_boolean_handled_accumulator, NULL,
                  _gtk_marshal_BOOLEAN__BOXED,
                  G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+                 GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE | G_SIGNAL_DEPRECATED);
 
   /**
    * GtkWidget::window-state-event: